Package-level declarations

Types

Link copied to clipboard
class CustomGeometrySource(id: String, options: CustomGeometrySourceOptions) : Source

Custom Geometry Source, allows using FeatureCollections.

Link copied to clipboard
class CustomRasterSource(id: String, options: CustomRasterSourceOptions) : Source

Describes the Custom Raster Source to be used in the style.

Link copied to clipboard
abstract class Source(val sourceId: String) : StyleContract.StyleSourceExtension

Base class for sources.

Link copied to clipboard
class TileSet : HashMap<String, Value>

Tile set, allows using TileJson specification as source. Note that encoding is only relevant to raster-dem sources, and is not supported in the TileJson spec.

Functions

Link copied to clipboard
fun GeoJsonSource.addGeoJSONSourceFeatures(features: List<Feature>, dataId: String = "")

Add additional features to a GeoJSON style source. The data will be scheduled and applied on a worker thread.

Link copied to clipboard

Extension function to add a Source provided by the Style Extension to the Style.

Link copied to clipboard
fun customGeometrySource(id: String, block: CustomGeometrySourceOptions.Builder.() -> Unit): CustomGeometrySource

DSL function for CustomGeometrySource.

Link copied to clipboard
fun customRasterSource(id: String, block: CustomRasterSourceOptions.Builder.() -> Unit): CustomRasterSource

DSL function for CustomRasterSource.

Link copied to clipboard

Extension function to get a Source provided by the Style Extension by source id.

Link copied to clipboard
inline fun <T : Source> MapboxStyleManager.getSourceAs(sourceId: String): T?

Tries to cast the Source to T.

Link copied to clipboard

Remove features from a GeoJSON style source. The data will be scheduled and applied on a worker thread.

Link copied to clipboard
fun GeoJsonSource.updateGeoJSONSourceFeatures(features: List<Feature>, dataId: String = "")

Update existing features in a GeoJSON style source. The data will be scheduled and applied on a worker thread.

Link copied to clipboard

Updates the image of an image style source with Bitmap provided.

fun ImageSource.updateImage(image: Image)

Updates the image of an image style source with Image provided.